from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os

def generate_launch_description():
    # 获取配置文件路径
    config_dir = os.path.join(
        get_package_share_directory('point_transfor'),
        'config',
        'transform_params.yaml'
    )
    
    # 定义节点，加载YAML配置文件
    transformer_node = Node(
        package='point_transfor',
        executable='point_transfor',
        name='point_transfor',
        output='screen',
        parameters=[config_dir]  # 加载YAML配置文件
    )

    return LaunchDescription([
        transformer_node
    ])
    